<?php

/* 客户关系模型 */
class CustomerModel extends BaseModel
{
    var $table  = 'customer';
    var $prikey = 'customer_id';
    var $_name  = 'customer';
    var $_relation  = array(
        // 一个客户可以有多条回访记录
        'has_customerrecord' => array(
            'model'         => 'customerrecord',
            'type'          => HAS_MANY,
            'foreign_key'   => 'customer_id',
            'dependent'     => true
        ),
    );
}

?>